package com.lwj.liwanjia.view.activity.myindent;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.lwj.liwanjia.R;
import com.lwj.liwanjia.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class BuyUnorderDetailActivity extends BaseActivity {

    @BindView(R.id.status_bar)
    RelativeLayout statusBar;
    @BindView(R.id.iv_left)
    ImageView ivLeft;
    @BindView(R.id.tv_left)
    TextView tvLeft;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_right)
    ImageView ivRight;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.head_layout)
    RelativeLayout headLayout;
    @BindView(R.id.iv_pay_state)
    ImageView ivPayState;
    @BindView(R.id.tv_pay_state)
    TextView tvPayState;
    @BindView(R.id.pay_state)
    LinearLayout payState;
    @BindView(R.id.tv_price)
    TextView tvPrice;
    @BindView(R.id.ll_price)
    LinearLayout llPrice;
    @BindView(R.id.detail_head)
    RelativeLayout detailHead;
    @BindView(R.id.tv_xinxi)
    TextView tvXinxi;
    @BindView(R.id.tv_infor)
    TextView tvInfor;
    @BindView(R.id.tv_dianpu)
    TextView tvDianpu;
    @BindView(R.id.rl_xinxi)
    RelativeLayout rlXinxi;
    @BindView(R.id.tv_peisong)
    TextView tvPeisong;
    @BindView(R.id.tv_detal_peisong)
    TextView tvDetalPeisong;
    @BindView(R.id.rl_peisong)
    RelativeLayout rlPeisong;
    @BindView(R.id.tv_peisong_address)
    TextView tvPeisongAddress;
    @BindView(R.id.tv_detail_address)
    TextView tvDetailAddress;
    @BindView(R.id.rl_peisong_address)
    RelativeLayout rlPeisongAddress;
    @BindView(R.id.tv_zhifu)
    TextView tvZhifu;
    @BindView(R.id.tv_detal_zhifu)
    TextView tvDetalZhifu;
    @BindView(R.id.rl_zhifu)
    RelativeLayout rlZhifu;
    @BindView(R.id.tv_fahuo)
    TextView tvFahuo;
    @BindView(R.id.tv_detal_fahuo)
    TextView tvDetalFahuo;
    @BindView(R.id.rl_fahuo)
    RelativeLayout rlFahuo;
    @BindView(R.id.tv_bianhao)
    TextView tvBianhao;
    @BindView(R.id.tv_detal_bianhao)
    TextView tvDetalBianhao;
    @BindView(R.id.tv_fuzhi)
    TextView tvFuzhi;
    @BindView(R.id.rl_bianhao)
    RelativeLayout rlBianhao;
    @BindView(R.id.tv_xiadan)
    TextView tvXiadan;
    @BindView(R.id.tv_detal_xiadan)
    TextView tvDetalXiadan;
    @BindView(R.id.rl_xiadan)
    RelativeLayout rlXiadan;
    @BindView(R.id.tv_liuyan)
    TextView tvLiuyan;
    @BindView(R.id.tv_detal_liuyan)
    TextView tvDetalLiuyan;
    @BindView(R.id.rl_liuyan)
    RelativeLayout rlLiuyan;
    @BindView(R.id.tv_quxiao_indent)
    TextView tvQuxiaoIndent;
    @BindView(R.id.tv_minute)
    TextView tvMinute;
    @BindView(R.id.tv_second)
    TextView tvSecond;
    @BindView(R.id.ll_topay)
    LinearLayout llTopay;
    @BindView(R.id.ll_bottom)
    LinearLayout llBottom;
    @BindView(R.id.tv_call)
    TextView tvCall;
    private String type;

    @Override
    protected void initView() {
        type=getIntent().getStringExtra("type");
        tvLeft.setVisibility(View.VISIBLE);
        tvTitle.setText("订单详情");
        llTopay.setVisibility(View.GONE);
        tvCall.setVisibility(View.VISIBLE);
        tvCall.setText("联系骑手");
        if(type.equals("待接单")) {
            tvPayState.setText("待接单");
            tvPrice.setText("等待骑手接单...");
            ivPayState.setImageResource(R.mipmap.daifahuo);
        }else if(type.equals("已接单")){
            tvPayState.setText("已接单");
            tvPrice.setText("骑手已接单，正在配送中...");
            ivPayState.setImageResource(R.mipmap.daifahuo);
        } else if (type.equals("已完成")) {
            ivPayState.setImageResource(R.mipmap.yiwancheng);
            tvPayState.setText("已完成");
            tvPrice.setText("骑手已送达，请评价...");
        }

    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_buy_detail;
    }

    @OnClick(R.id.tv_left)
    public void onViewClicked() {
        finish();
    }


}
